<div class="indices view">
<h2><?php  echo __('View Index'); ?></h2>
	<dl>
		<!--
		<dt><?php echo __('Index ID'); ?></dt>
		<dd>
			<?php echo h($index['Index']['IndicesID']); ?>
			&nbsp;
		</dd>
	-->
	<table>
	<tr>
		<th><?php echo __('Index Name'); ?></th>
		<td>
			<?php echo h($index['Index']['IndexName']); ?>
			&nbsp;
		</td>
	</tr>
	
	<tr>
		<th><?php echo __('Date'); ?></th>
		<td>
			<?php echo h($index['Index']['Date']); ?>
			&nbsp;
		</td>
	</tr>
	</table>
	</dl>
	
	<table border="0.5">
<tr>
    <th colspan="2">Monthly Returns </th>
    <th colspan="2">Yearly Returns </th>
    <th>Since Inception Return </th>
  </tr>

<tr>
	<td>1 month</td>
	<td><?php echo h($index['Index']['OneMonthReturn']); ?> &nbsp;</td>
	<td>1 year</td>
	<td><?php echo h($index['Index']['OneYearReturn']); ?> &nbsp;</td>
	<td><?php echo h($index['Index']['SinceInceptionReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td>3 month</td>
	<td><?php echo h($index['Index']['ThreeMonthReturn']); ?> &nbsp;</td>
	<td>2 years</td>
	<td><?php echo h($index['Index']['TwoYearReturn']); ?> &nbsp;</td>
</tr>


<tr>
	<td>6 month</td>
	<td><?php echo h($index['Index']['SixMonthReturn']); ?> &nbsp;</td>
	<td>3 years</td>
	<td><?php echo h($index['Index']['ThreeYearReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td></td>
	<td></td>
	<td>4 years</td>
	<td><?php echo h($index['Index']['FourYearReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td></td>
	<td></td>
	<td>5 years</td>
	<td><?php echo h($index['Index']['FiveYearReturn']); ?> &nbsp;</td>
</tr>
</table>
</dl>

<table cellpadding="0" cellspacing="0">
	<tr>
		<th>Date</th>
		<th>1 Month</th>
		<th>3 Month</th>
		<th>6 Month</th>
		<th>1 Year</th>
		<th>2 Year</th>
		<th>3 Year</th>
		<th>4 Year</th>
		<th>5 Year</th>
		<th>Since Inception</th>
	</tr>
	<?php
		$recordTotal=$this->Session->read("recordIndexTotal");
		$recordPer=$this->Session->read("recordIndexPer");
		echo "<h3>Displaying last 10 monthly records:</h3><h4>(".$recordTotal." records in total)</h4>";
		echo "<br>";
		for($n=0;$n<$recordTotal;$n++)
		{?>
			<tr><?php
			for($m=1;$m<$recordPer;$m++)
			{
				?>
				<td><?php echo $this->Session->read("recordIndex[".$n."][".$m."]") ?></td><?php
			}?>
			<div id="mybuttons">
			<td class="myButtons">
						<?php 
							//View Link
							echo "<a href=/DFS/indices/view/".$this->Session->read("recordIndex[".$n."][0]")."><img src=/DFS/img/view-btn.jpg alt=View/></a>";
						?>
			</td>
			</div>
			<?php
		}
	?>
</table>
</div>